package son.hut.vn;

import android.app.Activity;
import android.os.Bundle;
import android.view.Menu;
import android.widget.TabHost;

public class MultiviewonTab extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.multiviewon_tab);
		
		//khai bao, khoi tao tabhost
		TabHost tabHost = (TabHost)findViewById(R.id.tabhost);
		
		//goi phuong thuc setup de bien activity thanh tab (Chi duoc dung dang multiview thoi)
		tabHost.setup();
		
		//dinh nghia cac tab
		TabHost.TabSpec tabSpec1 = tabHost.newTabSpec("tag1");
		tabSpec1.setIndicator("Email", getResources().getDrawable(android.R.drawable.ic_dialog_email));
		tabSpec1.setContent(R.id.ln1);
		
		TabHost.TabSpec tabSpec2 = tabHost.newTabSpec("tag2");
		tabSpec2.setIndicator("Add", getResources().getDrawable(android.R.drawable.ic_menu_add));
		tabSpec2.setContent(R.id.ln2);
		
		TabHost.TabSpec tabSpec3 = tabHost.newTabSpec("tag3");
		tabSpec3.setIndicator("Map", getResources().getDrawable(android.R.drawable.ic_dialog_map));
		tabSpec3.setContent(R.id.ln3);
		
		
		//dinh cac tab vao tabhost
		tabHost.addTab(tabSpec1);
		tabHost.addTab(tabSpec2);
		tabHost.addTab(tabSpec3);
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.multiviewon_tab, menu);
		return true;
	}

}
